DIRS =				test

RUN =				$(DIRS:%=run-%)
CLEANDIRS =			$(DIRS:%=clean-%)
CLEANALLDIRS =		$(DIRS:%=cleanall-%)

all:				$(DIRS)
$(DIRS):
					$(MAKE) -C $@

run:				$(RUN)
$(RUN):
					$(MAKE) -C $(@:run-%=%) run

clean:				$(CLEANDIRS)
$(CLEANDIRS):
					$(MAKE) -C $(@:clean-%=%) clean

cleanall:			$(CLEANALLDIRS) unload
$(CLEANALLDIRS):
					$(MAKE) -C $(@:cleanall-%=%) cleanall

save:
					mkdir output					&& \
					cd include						&& \
					7z a -xr!?svn\* atr.7z atr 		&& \
					mv atr.7z ../output

unload:
					rm -f -r output

.PHONY: 			subdirs $(DIRS)
.PHONY: 			subdirs $(RUN)
.PHONY: 			subdirs $(CLEANDIRS)
.PHONY: 			subdirs $(CLEANALLDIRS)

